/**
 * vue插件：注册全局组件
 */
import Skeleton from './Skeleton'
import Slider from './Slider'
import More from './More'
import Bread from './Bread'
import BreadItem from './Bread/item.vue'
import City from './City'
import Sku from './Sku'
import Numbox from './Numbox'
import Button from './Button'
import CheckBox from './CheckBox'

// 1.准备放组件的数组
const cps = [Skeleton, Slider, More, Bread, BreadItem, City, Sku, Numbox, Button, CheckBox]

export default {
  // vue2:参数是Vue构造函数 vue3：app 根实例
  install (app) {
    // app.component('Skeleton', Skeleton)
    cps.forEach(cp => {
      app.component(cp.name, cp)
    })
  }
}
